//
//  MXFindBlockTypeNineCollectionViewCell.m
//  MXの衣柜
//
//  Created by 马霄 on 15/8/15.
//  Copyright (c) 2015年 霄 马. All rights reserved.
//

#import "MXFindBlockTypeNineCollectionViewCell.h"
#import "UIImageView+WebCache.h"
@implementation MXFindBlockTypeNineCollectionViewCell
- (void)dealloc
{
    [_mainImageView release];
    [super dealloc];
}
-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.mainImageView = [[[UIImageView alloc] init] autorelease];
        self.mainImageView.backgroundColor = [UIColor orangeColor];
        [self.contentView addSubview:self.mainImageView];
    }
    return self;
}
-(void)layoutSubviews
{
    
    [super layoutSubviews];
    self.mainImageView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
}

-(void)getInfo:(MXFindDetailModel *)model rowNum:(NSInteger)rowNum
{
    NSMutableArray *arr = [NSMutableArray array];
    for (NSDictionary *dict in model.product) {
        [arr addObject:[dict objectForKey:@"img"]];
    }
    
    [self.mainImageView sd_setImageWithURL:[NSURL URLWithString:arr[rowNum]] placeholderImage:[UIImage imageNamed:@"plaseholder"]];
    
}
@end
